package org.dromara.components.sysRegion.domain.bo;

import org.dromara.components.sysRegion.domain.SysRegion;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 省市区街道信息业务对象 sys_region
 *
 * @author wdm
 * @date 2024-02-26
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SysRegion.class, reverseConvertGenerate = false)
public class SysRegionBo extends BaseEntity {

    /**
     * 主键ID
     */
    @NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 父级ID
     */
    @NotNull(message = "父级ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long parentId;

    /**
     * 父级名称
     */
    private String parentName;

    /**
     * 名称
     */
    @NotBlank(message = "名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 类型（1-省，2-市，3-区，4-街道）
     */
    @NotNull(message = "类型（1-省，2-市，3-区，4-街道）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer type;


}
